
<% if order.unpaid? %>
  <button class="btn btn-primary" onclick="window.location.href='/payments/generate_pay?order_no=<%= order.order_no %>'">立即付款</button>
<% elsif order.down_payment? %>
  <button class="btn">已支付测量费</button>
<% elsif order.survey_pending? %>
  <button class="btn">待测量</button>
<% elsif order.survey_completed? %>
  <button class="btn btn-primary" onclick="window.location.href='/payments/generate_pay?order_no=<%= order.order_no %>'">支付尾款</button>
<% elsif order.tail_payment? %>
  <button class="btn">已支付尾款</button>
<% elsif order.install_pending? %>
  <button class="btn">待安装</button>
<% elsif order.completed? %>
  <button class="btn">订单完成</button>
<% end %>
